package com.jy.adscm.operation.cg.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.io.Serializable;

/**
 * <p>
 * 采购计划
 * </p>
 *
 * @author zyl
 * @since 2019-07-07
 */
public class CgPurchasePlan implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 令号
     */
    private Integer makeNo;
    /**
     * 供应商
     */
    private Long sid;
    @TableField(exist = false)
    private String supplierName;
    /**
     * bom
     */
    private Long bid;
    @TableField(exist = false)
    private   CgMaterial bomName;
    /**
     * 需求数量
     */
    private Float needNums;
    /**
     * 库存数量
     */
    private Float stockNums;
    /**
     * 预计到货时间
     */
    private Date planArriveDate;
    /**
     * 单价
     */
    private Float price;
    /**
     * 总价
     */
    private String total;
    /**
     * 下单日期
     */
    private Date orderDate;
    /**
     * 生成订单后为0，确认订单后修改为1，直接把任务添加到进行中采购任务
     */
    private Integer state;
    /**
     * 最小采购量
     */
    private String minPurchase;
    /**
     * 付款时间
     */
    private Date payDate;
    /**
     * 创建人
     */
    private String creator;
    @TableField(exist = false)
    private String creatorName;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 实际采购数量
     */
    private  Float actNums;
    //采购类型
    private  Integer  type;

    private  Integer macType;
    @TableField(exist = false)
    private  String macTypeName;
    //剩余量
    private  Float   remainingNum;
    //是否购买
    private  Integer  isNeedBuy;

    public Float getRemainingNum() {
        return remainingNum;
    }

    public void setRemainingNum(Float remainingNum) {
        this.remainingNum = remainingNum;
    }

    public Integer getIsNeedBuy() {
        return isNeedBuy;
    }

    public void setIsNeedBuy(Integer isNeedBuy) {
        this.isNeedBuy = isNeedBuy;
    }

    public String getMacTypeName() {
        return macTypeName;
    }

    public void setMacTypeName(String macTypeName) {
        this.macTypeName = macTypeName;
    }

    public Integer getMacType() {
        return macType;
    }

    public void setMacType(Integer macType) {
        this.macType = macType;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Float getActNums() {
        return actNums;
    }

    public void setActNums(Float actNums) {
        this.actNums = actNums;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public CgMaterial getBomName() {
        return bomName;
    }

    public void setBomName(CgMaterial bomName) {
        this.bomName = bomName;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getMakeNo() {
        return makeNo;
    }

    public void setMakeNo(Integer makeNo) {
        this.makeNo = makeNo;
    }

    public Long getSid() {
        return sid;
    }

    public void setSid(Long sid) {
        this.sid = sid;
    }

    public Long getBid() {
        return bid;
    }

    public void setBid(Long bid) {
        this.bid = bid;
    }

    public Float getNeedNums() {
        return needNums;
    }

    public void setNeedNums(Float needNums) {
        this.needNums = needNums;
    }

    public Float getStockNums() {
        return stockNums;
    }

    public void setStockNums(Float stockNums) {
        this.stockNums = stockNums;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getPlanArriveDate() {
        return planArriveDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setPlanArriveDate(Date planArriveDate) {
        this.planArriveDate = planArriveDate;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public String getTotal() {
        return total;
    }

    public void setTotal(String total) {
        this.total = total;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getOrderDate() {
        return orderDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getMinPurchase() {
        return minPurchase;
    }

    public void setMinPurchase(String minPurchase) {
        this.minPurchase = minPurchase;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getPayDate() {
        return payDate;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setPayDate(Date payDate) {
        this.payDate = payDate;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "CgPurchasePlan{" +
        "id=" + id +
        ", makeNo=" + makeNo +
        ", sid=" + sid +
        ", bid=" + bid +
        ", needNums=" + needNums +
        ", stockNums=" + stockNums +
        ", planArriveDate=" + planArriveDate +
        ", price=" + price +
        ", total=" + total +
        ", orderDate=" + orderDate +
        ", state=" + state +
        ", minPurchase=" + minPurchase +
        ", payDate=" + payDate +
        ", creator=" + creator +
        ", createTime=" + createTime +
        "}";
    }
}
